﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CDStore3Tiers;

namespace CuaHangDiaNhac
{
	public partial class frmInHoaDonBanHang : Form
	{
		StoreCDDataContext db;
		public frmInHoaDonBanHang(int mahd)
		{
			InitializeComponent();
			db = new StoreCDDataContext();
			db.Connection.ConnectionString = getConfig.getConnection();
			this.Text += mahd.ToString();
		}

		private void frmInHoaDonBanHang_Load(object sender, EventArgs e)
		{
			db = new StoreCDDataContext();
			db.Connection.ConnectionString = getConfig.getConnection();
			int mahd = Convert.ToInt32(this.Text.Substring(25));
			HoaDonBanBindingSource.DataSource = db.HoaDonBan_SearchById(mahd);
			vw_CTHDBHNewBindingSource.DataSource = db.vw_CTHDBHNew_SelectByID(mahd);
			this.reportViewer1.RefreshReport();
		}
	}
}
